package com.dongdongshop.config;

import com.aliyun.teaopenapi.Client;
import com.aliyun.teaopenapi.models.Config;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

@Configuration
public class AaliyunConfig {

    @Bean
    public  com.aliyun.dysmsapi20170525.Client createClient() throws Exception {
        Config config = new Config()
                // 您的AccessKey ID"", ""
                .setAccessKeyId("LTAI4GCbdwnjCGwQj9Z3tr3N")
                // 您的AccessKey Secret
                .setAccessKeySecret("27ih4pc1W1tqey9X4mmCy1JUotAX7L");
        // 访问的域名
        config.endpoint = "dysmsapi.aliyuncs.com";
        return new com.aliyun.dysmsapi20170525.Client(config);

    }
}